/**
 * 路由meta对象参数说明
 * meta: {
 *      title:          菜单栏及 tagsView 栏、菜单搜索名称（国际化）
 *      isLink：        是否超链接菜单，开启外链条件，`1、isLink: 链接地址不为空 2、isIframe:false`
 *      isHide：        是否隐藏此路由
 *      isKeepAlive：   是否缓存组件状态
 *      isAffix：       是否固定在 tagsView 栏上
 *      isIframe：      是否内嵌窗口，开启条件，`1、isIframe:true 2、isLink：链接地址不为空`
 *      roles：         当前路由权限标识，取角色管理。控制路由显示、隐藏。超级管理员：admin 普通角色：common
 *      icon：          菜单、tagsView 图标，阿里：加 `iconfont xxx`，fontawesome：加 `fa xxx`
 * }
 */

/**
 * 定义动态路由
 * @description 未开启 isRequestRoutes 为 true 时使用（前端控制路由），开启时第一个顶级 children 的路由将被替换成接口请求回来的路由数据
 * @description 各字段请查看 `@/views/system/menu/component/addMenu.vue 下的 ruleForm`
 * @returns 返回路由菜单数据
 */
export const dynamicRoutes = [
	{
		path: '/',
		name: '/',
		component: () => import('@/layout/index.vue'),
		redirect: '/home',
		meta: {
			isKeepAlive: true,
		},
		children: [],
	},
];


export const notFoundAndNoPower = [
	{
		path: '/:path(.*)*',
		name: 'notFound',
		component: () => import('@/views/404.vue'),
		meta: {
			title: '页面找不到',
			isHide: true,
		},
	},
];

/**
 * 定义静态路由（默认路由）
 * 此路由不要动，前端添加路由的话，请在 `dynamicRoutes 数组` 中添加
 * @description 前端控制直接改 dynamicRoutes 中的路由，后端控制不需要修改，请求接口路由数据时，会覆盖 dynamicRoutes 第一个顶级 children 的内容（全屏，不包含 layout 中的路由出口）
 * @returns 返回路由菜单数据
 */
export const staticRoutes = [
	{
		path: '/login',
		name: 'login',
		component: () => import('@/views/login.vue'),
		meta: {
			title: '登录',
		},
	},
	{
		path: '/assist',
		name: 'assist',
		component: () => import('@/views/assist/szassis.vue'),
		meta: {
			title: '三智助手',
		},
	},
	{
		path: '/download',
		name: 'download',
		component: () => import('@/views/download.vue'),
		meta: {
			title: '下载',
		},
	},
	{
		path: '/design',
		name: 'design',
		component: () => import('@/views/design/design.vue'),
		meta: {
			title: '设计',
		},
	},
	{
		path: '/help',
		name: 'help',
		component: () => import('@/views/design/helpEdit.vue'),
		meta: {
			title: '帮助',
		},
	},
	{
		path: '/ps',
		name: 'ps',
		component: () => import('@/views/ps/pslogin.vue'),
		meta: {
			title: '配送登录',
		},
	},
	{
		path: '/deliverMenu',
		name: 'deliverMenu',
		component: () => import('@/views/ps/deliverMenu.vue'),
		children: [
			{
				path: '/cargoquick',
				name: 'cargoquick',
				component: () => import('@/views/ps/cargo_quick.vue'),
			},
			{
				path: '/waitToGo',
				name: 'waitToGo',
				component: () => import('@/views/ps/waitToGo.vue'),
			},
			{
				path: '/waitToGoDetail',
				name: 'waitToGoDetail',
				component: () => import('@/views/ps/waitToGoDetail.vue'),
			},
			{
				path: '/chtj',
				name: 'chtj',
				component: () => import('@/views/ps/chtj.vue'),
			},
			{
				path: '/shy',
				name: 'shy',
				component: () => import('@/views/ps/shy.vue'),
			},
			{
				path: '/sp',
				name: 'sp',
				component: () => import('@/views/ps/sp.vue'),
			},
			{
				path: '/sets',
				name: 'sets',
				component: () => import('@/views/ps/sets.vue'),
			},
			{
				path: '/videoSets',
				name: 'videoSets',
				component: () => import('@/views/ps/videoSets.vue'),
			},
			{
				path: '/rk',
				name: 'rk',
				component: () => import('@/views/ps/rk.vue'),
			},
			{
				path: '/rklist',
				name: 'rklist',
				component: () => import('@/views/ps/rklist.vue'),
			},
			{
				path: '/kc',
				name: 'kc',
				component: () => import('@/views/ps/kc.vue'),
			},
		]
	},


];
